<template>
	<view>
		<view class="jiange">拜访人信息</view>
		<view class="body">
			<view class="item">
				<text><text style="color: red;margin-right: 5rpx;">*</text>拜访人员</text>
				<input value="" type="text" placeholder="请输入" style="text-align: end;" />
			</view>
			<view class="item">
				<text><text style="color: red;margin-right: 5rpx;">*</text>部门</text>
				<input value="" type="text" placeholder="请输入" style="text-align: end;" />
			</view>
			<view class="item">
				<text><text style="color: red;margin-right: 5rpx;">*</text>地址</text>
				<input value="" type="text" placeholder="请输入" style="text-align: end;" />
			</view>
			<view class="item" @click="show=true">
				<text><text style="color: red;margin-right: 5rpx;">*</text>访问时间</text>
				<u-datetime-picker @confirm="getTime" @cancel="show=false" :show="show" v-model="value1"
					mode="datetime"></u-datetime-picker>
				<u-icon :name="time"></u-icon>
			</view>
		</view>
		<view class="jiange">受邀人</view>
		<view class="body">
			<view class="item">
				<text><text style="color: red;margin-right: 5rpx;">*</text>手机号</text>
				<input value="" type="number" placeholder="请输入" style="text-align: end;" />
			</view>
			<view class="item">
				<text>姓名</text>
				<input value="" type="text" placeholder="请输入" style="text-align: end;" />
			</view>
		</view>
		<view class="jiange">审批人</view>
		<view class="body">
			<view class="item">
				<text>审批人</text>
				<view style="display: flex;justify-content: flex-end;align-items: center;position: relative;">
					<image style="width: 70rpx;height: 70rpx;" src="../../../static/icon-geren.png" mode="aspectFit">
					</image>
					<text>曾小贤</text>
					<view style="width: 30rpx;height: 30rpx;position: absolute;top: -20rpx;right: 0rpx;
						box-shadow: 3rpx 3rpx 20rpx #6c6c6c;border-radius: 10rpx;
						background-color: #fff849;font-size: 20rpx;line-height: 30rpx;text-align: center;">
						1</view>
				</view>
			</view>
		</view>
		<view style="width: 100%;position: absolute;bottom: 20rpx;">
			<button type="default"
				style="background-color: #007AFF;width: 90%;color: #fff;border-radius: 20rpx;">提交预约</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				value1: Number(new Date()),
				time: 'arrow-right'
			}
		},
		methods: {
			getTime(time) {
				console.log(time);
				this.time = uni.$u.timeFormat(time.value, 'yyyy-mm-dd hh:MM')
				this.show = false
			}
		}
	}
</script>

<style>
	.jiange {
		height: 60rpx;
		width: 100%;
		background-color: #f2f2f2;
		line-height: 60rpx;
		padding-left: 30rpx;
		color: #a7a7a7;
		font-size: 30rpx;
	}

	.body {
		padding-left: 30rpx;
		line-height: 70rpx;
		font-size: 32rpx;
	}

	.item {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding-right: 30rpx;
		border-bottom: #f2f2f2 1rpx solid;
	}
</style>
